package com.dmall.rpc.service.impl;

import com.dmall.rpc.server.RpcService;
import com.dmall.rpc.service.Person;
import com.dmall.rpc.service.PersonService;

import java.util.Arrays;
import java.util.List;

@RpcService(PersonService.class)
public class PersonServiceImpl implements PersonService {

    @Override
    public String getPersonName(Integer id) {
        return "zhangsan";
    }

    @Override
    public Person getPerson(Person person) {
        return person;
    }

    @Override
    public List<Person> getPersonList() {
        return Arrays.asList(new Person(1, "zhangsan", 20), new Person(2, "lisi", 30), new Person(3, "wangwu", 18));
    }
}
